<?php
/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/

/**
 * CRON to update the boolean history table (for non boolean modules): 15 minute MA
 * @author Duleepa Wijayawardhana <dups@bioware.com>
 * @version Thu Oct 19 11:59:00 2006
 */
require("/bigdaddy/phplib/init/cron_init.inc");
set_time_limit(0);
/**
 * Constant for the correct moving average
 */
define("MA_TYPE", "bool60");
/**
 * Constant for the database table
 */
define("MA_TABLE", "bool60_server_module_history");
/**
 * Counter to enter unchanged values
 */
define("MA_INCREMENT_COUNT", 60);
/**
 * CronID
 */
define("CRON_ID", 3);
cronstart(CRON_ID, "CRON_NO_DUPLICATE_PROCESS");

require("statscron_boolbody.php");

//No set the last end time
$sql = "UPDATE ma_cronstatus SET
    last_end = $nNow
    WHERE ma_type = '".MA_TYPE."'";
db_query($sql, array("dbHandle" => "bigdaddystats"));


cronend(CRON_ID);

?>
